<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>商之联-供应商后台管理系统</title>
  <meta name="description" content="商之联">
  <meta name="keywords" content="table">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" type="image/png" href="{:C('SHOP_HOME_IMG')}favicon.png"> <link rel="apple-touch-icon-precomposed" href="{:C('SHOP_HOME_IMG')}app-icon72x72@2x.png"> 
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" href="{:C('GONG_HOME_CSS')}amazeui.min.css"/>
  <link rel="stylesheet" href="{:C('GONG_HOME_CSS')}admin.css">
</head>
<body>
<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
  以获得更好的体验！</p>
<![endif]-->
<!-- header start-->

<include file="Public:header"/>

<!-- header end-->

<div class="am-cf admin-main">
 <!-- sidebar start -->
   <include file="Public:menu"/>
  <!-- sidebar end -->
  
  <!-- content start -->
  <div class="admin-content">

    <div class="am-cf am-padding">
      <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">商品管理</strong> / <small>商品列表</small></div>
    </div>
    <div class="am-g">
      <div class="am-u-md-3 am-cf" style="float:right">
        <div class="am-fr">
         <!--  <div class="am-input-group am-input-group-sm">
           <input type="text" class="am-form-field">
               <span class="am-input-group-btn">
                 <button class="am-btn am-btn-default" type="button">搜索</button>
               </span>
         </div> -->
        </div>
      </div>
    </div>
    <div class="am-g">
      <div class="am-u-sm-12">
        <form class="am-form">
          <table class="am-table am-table-striped am-table-hover table-main">
            <thead>
              <tr>
                
                <th class="table-id">ID</th>
                <th class="table-title">商品名称</th>
                <th class="table-title">规格</th>

                <th class="table-title">零售价</th>
                <th class="table-title">进货价</th>
                <th class="table-title">库存</th>
                <th class="table-title">审核状态</th>

                
                <th class="table-date">生成日期</th>
                <th class="table-set">操作</th>
              </tr>
          </thead>
          <tbody>
            <foreach name="items" item='item'>
            <tr class="item_{$item['itemid']}">
              
              <td>{$item['itemid']}</td>
			  <td>
			  <if condition="$item.isspeci neq 0 ">            
			   <a href="javascript:void(0)" onclick="$.ItemLayer.addLayer({$item['itemid']})" data-am-modal="{target: '#pro_spec'}"><span class=" am-icon-plus-square-o"></span></a>
			   </if> 
			   {$item['itemname']}</td>
              <td>{$item['bn']}</td>
              <td > <span  class="itemprice" value="price" id="{$item['itemid']}" >  {$item['price']}</span> </td>
              <td><span class="supprice" value="supprice" id="{$item['itemid']}" > {$item['supperprice']}</span> </td>
              
              <td> <span class="inventory" value="inventory" id="{$item['itemid']}" > {$item['inventory']} </span> </td>
             <td><if condition="$item['examine'] eq 1">通过<else/>未审核</if></td>
             
              <td>{$item.createtime|date="Y-m-d ",###}</td>
              <td>
                <div class="am-btn-toolbar">
                  <div class="am-btn-group am-btn-group-xs">
                    <button class="am-btn am-btn-default am-btn-xs am-text-secondary">
                    <span class="am-icon-pencil-square-o"><a href="{:U('Item/viewItem',array('itemid'=>$item['itemid']))}">预览</a> </span> </button>
                  </div>
                </div>
              </td>
            </tr>
            </foreach>
          </tbody>
        </table>
          <div class="am-cf">
  共 {$pagearr['count']}条记录
  
<div class="am-fr">
    <ul class="am-pagination">
      <li><a href="{:U('Item/index',array('page'=>$pagearr['prevpage']))}">«</a></li>
       <?php $k=0; ?>
      <for start="$pagearr['page']" end="$pagearr['pagetotal']+1"  name='i' step="1">
         <if condition="$k lt 6">
           <li <if condition="$i eq $pagearr['page']"> class="am-active" </if>  > <a href="{:U('Item/index',array('page'=>$i))}">{$i}</a></li>
         </if>
       <?php $k+=1;  ?>
      </for>
      
      <li><a href="{:U('Item/index',array('page'=>$pagearr['nextpage']))}">»</a></li>
    </ul>
  </div>

</div>
        </form>
      </div>

    </div>
  </div>
  <!-- content end -->
</div>
<footer>
  <hr>
  <p class="am-padding-left">© 2014 商之联.</p>
</footer>
<!-- 多规格弹出层 -->
<div class="am-popup" id="pro_spec">
  <div class="am-popup-inner">
    <div class="am-popup-hd">
      <h4 class="am-popup-title" >产品规格</h4>
      <span data-am-modal-close style="background-color:#E40A02; color:red;"class="am-close">&times;</span>
    </div>
    <div class="am-popup-bd">
       <table class="am-table am-table-striped am-table-hover protable ">
       <thead>
         <tr>
           <td>ID</td>
           <td>颜色</td>
           <td>零售价格</td>
           <td>供货价格</td>
           <td>库存</td>
         </tr>
       </thead>

       <tbody >
         
       </tbody>
         
       </table>
       <input type="hidden" name="itemidvalue" >
    </div>
  </div>
</div>
<!-- 多规格弹出层end -->
<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="{:C('SUPPLIER_ADMIN_JS')}polyfill/rem.min.js"></script>
<script src="{:C('SUPPLIER_ADMIN_JS')}polyfill/respond.min.js"></script>
<script src="{:C('SUPPLIER_ADMIN_JS')}amazeui.legacy.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="{:C('SHOP_HOME_JS')}jquery.min.js"></script>
<script src="{:C('SHOP_HOME_JS')}amazeui.min.js"></script>
<!--<![endif]-->
<script src="{:C('SHOP_HOME_JS')}app.js"></script>
<script src="{:C('GONG_HOME_JS')}supper.js"></script>
</body>
</html>
